//=============================================================================

#ifndef AACTION_H
  #define AACTION_H

//=============================================================================

#include "aString.h"
#include "aVector.h"
#include "aList.h"

//=============================================================================

enum aanAct
{
  ACT_NONE = -128,
  ACT_CHOOSED,
  ACT_WALK,
  ACT_ATTACK,
};

//=============================================================================

class aActionAttack
{
  public:
    aActionAttack() : type(ACT_ATTACK) {};
    ~aActionAttack() {};

    const aanAct type;
    unsigned long objectId;
};

//=============================================================================

class aActionChoosed
{
  public:
    aActionChoosed() : type(ACT_CHOOSED) {};
    ~aActionChoosed() {};

    const aanAct type;
    aString params;
};

//=============================================================================

class aActionWalk
{
  public:
    aActionWalk() : type(ACT_WALK) {};
    ~aActionWalk() {};

    const aanAct type;
    aList<aVector> path;
};

//=============================================================================

class aAction
{
  public:
    inline aanAct aaGetType() {return type;}

    aAction();
      void aaPrepareAction(const aActionChoosed& act);
      void aaPrepareAction(const aActionWalk& act);
      void aaPrepareAction(const aActionAttack& act);
    ~aAction();

  private:
      void aaClearAction();

  private:
    aanAct type;
    void* dataPtr;
};

//=============================================================================

#endif

//=============================================================================
